/*
 * File:   misc.h
 * Author: filipp
 *
 * Created on March 19, 2010, 6:15 PM
 */


#ifndef _POWDERGAME_H
#define _POWDERGAME_H


#include "Super_Widget.h"

#include "Flob.h"
#include <algorithm>
#include <sstream>


class GameManager : public Super_Widget{
public:
	GameManager(Super_Man* hero, const vec2f& s = vec2f(32,32));

	void update(const sf::Input& sfi, float time);	//do input and call step
	void SetSize(const vec2f& s);	//if the size changed, call changeSize
	void AddSize(const vec2f& s);	//if the size changed, call changeSize
	void Rotate(float Angle);		//does nothing. We don't spin


	void setDrawMode(int dm);
	void updateLpos(const vec2i& lp);

	void forceRender(sf::RenderTarget& Target);

	const Flob& getUrine() const;

	/*--- Particle Helper Functions ---*/

private:
	/*--- management members ---*/
	vec2i changeSize(vec2i nSize);
	void step(float dt);
	//fluidManager myUrine;
	Flob myUrine;
	int drawMode;
	float lastDt;
	/*--- IO assistance member(s) ---*/
	std::vector<vec2i> circle;
	vec2f lPos;

protected:
	virtual void Render(sf::RenderTarget& Target);
};


#endif /* _POWDERGAME_H */





